package f.admin.entity;

import java.lang.reflect.Field;
import java.util.Date;

import net.sf.json.JSONObject;

public class BusinessModule {

	private String id;
	private String name;
	private String aliasName;
	private Date createTime;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAliasName() {
		return aliasName;
	}
	public void setAliasName(String aliasName) {
		this.aliasName = aliasName;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getJsonString() {
		JSONObject jsonObj = new JSONObject();
		Field[] fields = this.getClass().getFields();
		for(int i = 0; i < fields.length; i++) {
			Field field = fields[i];
			try {
				jsonObj.put(field.getName(), field.get(this));
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return jsonObj.toString();
	}
}
